package entity;

import java.io.Serializable;

/**
 * 服务器与客户端间数据以对象数据流发送
 */
public class Chat implements Serializable {

    private static final long serialVersionUID = 1L;
    private String content;//信息内容
    private int senderQQ;//发送者
    private int receiveQQ;//接收者
    private Long sendTime;//发送时间

    public Chat(String content, int senderQQ, int receiveQQ, Long sendTime) {
        this.content = content;
        this.senderQQ = senderQQ;
        this.receiveQQ = receiveQQ;
        this.sendTime = sendTime;
    }

    public Chat(int senderQQ, int receiveQQ) {
        this.senderQQ = senderQQ;
        this.receiveQQ = receiveQQ;
    }

    public Chat() {
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getSenderQQ() {
        return senderQQ;
    }

    public void setSenderQQ(int senderQQ) {
        this.senderQQ = senderQQ;
    }

    public int getReceiveQQ() {
        return receiveQQ;
    }

    public void setReceiveQQ(int receiveQQ) {
        this.receiveQQ = receiveQQ;
    }

    public Long getSendTime() {
        return sendTime;
    }

    public void setSendTime(Long sendTime) {
        this.sendTime = sendTime;
    }

    @Override
    public String toString() {
        return "Chat{" +
                "content='" + content + '\'' +
                ", senderQQ=" + senderQQ +
                ", receiveQQ=" + receiveQQ +
                ", sendTime='" + sendTime + '\'' +
                '}';
    }
}
